﻿<Window x:Class="WpfVkontacteClient.WaitWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        WindowState="Normal" WindowStyle="None" AllowsTransparency="True" 
        ShowInTaskbar="False" WindowStartupLocation="CenterOwner" ShowActivated="True"
        SizeToContent="Height" Background="Transparent" FontSize="12pt" Title="Wait window">

	<Grid Background="Transparent">
		<Border HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="2" CornerRadius="10" MinWidth="400" MinHeight="200"
                        Background="#c0000000" BorderBrush="Black">
			<Border BorderThickness="2" Margin="1" BorderBrush="White" CornerRadius="10">
				<Grid ClipToBounds="True">
					<Grid.RowDefinitions>
						<RowDefinition />
						<RowDefinition Height="Auto" />
						<RowDefinition />
					</Grid.RowDefinitions>

					<Ellipse Grid.Row="1" StrokeThickness="5" StrokeDashArray=".5,1" Width="31" Height="31" Stroke="White"
							RenderTransformOrigin="0.5,0.5" CacheMode="BitmapCache">
						<Ellipse.Triggers>
							<EventTrigger RoutedEvent="Ellipse.Loaded">
								<BeginStoryboard>
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" 
																	RepeatBehavior="Forever">
											<SplineDoubleKeyFrame KeyTime="00:00:02" Value="360"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</BeginStoryboard>
							</EventTrigger>
						</Ellipse.Triggers>
						<Ellipse.RenderTransform>
							<RotateTransform/>
						</Ellipse.RenderTransform>
					</Ellipse>

					<TextBlock x:Name="TitleText" Foreground="White" Margin="5" FontSize="18pt" Text="Подождите идет загрузка..."
						HorizontalAlignment="Center" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="WrapWithOverflow" >
						<TextBlock.Effect>
							<DropShadowEffect Direction="0" BlurRadius="0" ShadowDepth="2"/>
						</TextBlock.Effect>
					</TextBlock>

					<TextBlock x:Name="MessageText" Grid.Row="2" Foreground="White" Margin="10" FontSize="16pt" 
        				Visibility="Visible"
        				HorizontalAlignment="Center" VerticalAlignment="Top" TextTrimming="CharacterEllipsis" TextWrapping="WrapWithOverflow" >
        				<TextBlock.Effect>
        					<DropShadowEffect Direction="0" BlurRadius="0" ShadowDepth="2"/>
        				</TextBlock.Effect>
					</TextBlock>

					<Ellipse HorizontalAlignment="Center" VerticalAlignment="Center">
						<Ellipse.Fill>
							<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
								<GradientStop Color="White" Offset="0"/>
								<GradientStop Offset="1" Color="#0CFFFFFF"/>
							</LinearGradientBrush>
						</Ellipse.Fill>
					</Ellipse>

				</Grid>
			</Border>
		</Border>
	</Grid>
</Window>